package com.lin.gulimall.product.web;

import com.lin.gulimall.product.service.SkuInfoService;
import com.lin.gulimall.product.vo.skuItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.concurrent.ExecutionException;

@Controller
public class ItemController {

    @Autowired
    SkuInfoService skuInfoService;

    /*
     * 方法描述 :
     * @since: 1.14.1
     * @param: skuId
     * @return:
     * @author: lin
     * @date: 2022/1/26
     */

    @GetMapping("/{skuId}.html")
    public String skuItem(@PathVariable("skuId") Long skuId) throws ExecutionException, InterruptedException {

        System.out.println("准备查询"+skuId+"详情");
        skuItemVo item = skuInfoService.item(skuId);


        return "item";
    }

}
